package TestDemo;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class TestDemo2 {
    public static void main(String[] args) throws IOException {
        Reader reader = new FileReader("test1.txt");
        char[] buf = new char[1024];

        int len = reader.read(buf);
        for (int i = 0; i < len; i++) {
            System.out.print(buf[i]);
        }

        reader.close();
    }
}
